package com.hyq.proxy.simple;
/**
* @ClassName: GameLeveling 
* @Description: 游戏工作室-代练 <具体代理类，委托类>
* @author Janus
 */
public class GameLeveling implements IGamePlayer,GameProxy {
	//代练的游戏玩家
	private IGamePlayer player=null;
	//代理构造函数
	public GameLeveling(String name){
		try {
			//游戏玩家
			this.player=new Players(this, name);
		} catch (Exception e) {
			e.printStackTrace();
		}
	} 
	//代练登录
	@Override
	public void login(String name) {
		this.player.login(name);
		//先收费，在代练有动力
		this.count();
	}
	/**
	 * 代练打怪
	 */
	@Override
	public void killBoss() {
		this.player.killBoss();
	}
	/**
	 * 代练升级
	 */
	@Override
	public void upgrade() {
		this.player.upgrade();
	}
	/**
	 * 代练装备
	 */
	@Override
	public void equipment() {
		this.player.equipment();
	}
	//收费
	@Override
	public void count() {
		System.out.println("代练太累了，收费500块");
	}

}
